home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / X11 / extensions / xf86vmode.h < prev    next >
C/C++ Source or Header  |  2006-04-12  |  9KB  |  323 lines

  1. /* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */
  2. /*
  3.  
  4. Copyright 1995  Kaleb S. KEITHLEY
  5.  
  6. Permission is hereby granted, free of charge, to any person obtaining
  7. a copy of this software and associated documentation files (the
  8. "Software"), to deal in the Software without restriction, including
  9. without limitation the rights to use, copy, modify, merge, publish,
  10. distribute, sublicense, and/or sell copies of the Software, and to
  11. permit persons to whom the Software is furnished to do so, subject to
  12. the following conditions:
  13.  
  14. The above copyright notice and this permission notice shall be
  15. included in all copies or substantial portions of the Software.
  16.  
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  20. IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES 
  21. OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  22. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23. OTHER DEALINGS IN THE SOFTWARE.
  24.  
  25. Except as contained in this notice, the name of Kaleb S. KEITHLEY 
  26. shall not be used in advertising or otherwise to promote the sale, use 
  27. or other dealings in this Software without prior written authorization
  28. from Kaleb S. KEITHLEY
  29.  
  30. */
  31. /* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */
  32.  
  33. /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
  34.  
  35. #ifndef _XF86VIDMODE_H_
  36. #define _XF86VIDMODE_H_
  37.  
  38. #include <X11/Xfuncproto.h>
  39. #include <X11/Xmd.h>
  40.  
  41. #define X_XF86VidModeQueryVersion    0
  42. #define X_XF86VidModeGetModeLine    1
  43. #define X_XF86VidModeModModeLine    2
  44. #define X_XF86VidModeSwitchMode        3
  45. #define X_XF86VidModeGetMonitor        4
  46. #define X_XF86VidModeLockModeSwitch    5
  47. #define X_XF86VidModeGetAllModeLines    6
  48. #define X_XF86VidModeAddModeLine    7
  49. #define X_XF86VidModeDeleteModeLine    8
  50. #define X_XF86VidModeValidateModeLine    9
  51. #define X_XF86VidModeSwitchToMode    10
  52. #define X_XF86VidModeGetViewPort    11
  53. #define X_XF86VidModeSetViewPort    12
  54. /* new for version 2.x of this extension */
  55. #define X_XF86VidModeGetDotClocks    13
  56. #define X_XF86VidModeSetClientVersion    14
  57. #define X_XF86VidModeSetGamma        15
  58. #define X_XF86VidModeGetGamma        16
  59. #define X_XF86VidModeGetGammaRamp    17
  60. #define X_XF86VidModeSetGammaRamp    18
  61. #define X_XF86VidModeGetGammaRampSize    19
  62. #define X_XF86VidModeGetPermissions    20
  63.  
  64. #define CLKFLAG_PROGRAMABLE        1
  65.  
  66. #ifdef XF86VIDMODE_EVENTS
  67. #define XF86VidModeNotify        0
  68. #define XF86VidModeNumberEvents        (XF86VidModeNotify + 1)
  69.  
  70. #define XF86VidModeNotifyMask        0x00000001
  71.  
  72. #define XF86VidModeNonEvent        0
  73. #define XF86VidModeModeChange        1
  74. #else
  75. #define XF86VidModeNumberEvents        0
  76. #endif
  77.  
  78. #define XF86VidModeBadClock        0
  79. #define XF86VidModeBadHTimings        1
  80. #define XF86VidModeBadVTimings        2
  81. #define XF86VidModeModeUnsuitable    3
  82. #define XF86VidModeExtensionDisabled    4
  83. #define XF86VidModeClientNotLocal    5
  84. #define XF86VidModeZoomLocked        6
  85. #define XF86VidModeNumberErrors        (XF86VidModeZoomLocked + 1)
  86.  
  87. #define XF86VM_READ_PERMISSION    1
  88. #define XF86VM_WRITE_PERMISSION    2
  89.  
  90. #ifndef _XF86VIDMODE_SERVER_
  91.  
  92. typedef struct {
  93.     unsigned short    hdisplay;
  94.     unsigned short    hsyncstart;
  95.     unsigned short    hsyncend;
  96.     unsigned short    htotal;
  97.     unsigned short    hskew;
  98.     unsigned short    vdisplay;
  99.     unsigned short    vsyncstart;
  100.     unsigned short    vsyncend;
  101.     unsigned short    vtotal;
  102.     unsigned int    flags;
  103.     int            privsize;
  104. #if defined(__cplusplus) || defined(c_plusplus)
  105.     /* private is a C++ reserved word */
  106.     INT32        *c_private;
  107. #else
  108.     INT32        *private;
  109. #endif
  110. } XF86VidModeModeLine;
  111.  
  112. typedef struct {
  113.     unsigned int    dotclock;
  114.     unsigned short    hdisplay;
  115.     unsigned short    hsyncstart;
  116.     unsigned short    hsyncend;
  117.     unsigned short    htotal;
  118.     unsigned short    hskew;
  119.     unsigned short    vdisplay;
  120.     unsigned short    vsyncstart;
  121.     unsigned short    vsyncend;
  122.     unsigned short    vtotal;
  123.     unsigned int    flags;
  124.     int            privsize;
  125. #if defined(__cplusplus) || defined(c_plusplus)
  126.     /* private is a C++ reserved word */
  127.     INT32        *c_private;
  128. #else
  129.     INT32        *private;
  130. #endif
  131. } XF86VidModeModeInfo;
  132.  
  133. typedef struct {
  134.     float        hi;
  135.     float        lo;
  136. } XF86VidModeSyncRange;
  137.  
  138. typedef struct {
  139.     char*            vendor;
  140.     char*            model;
  141.     float            EMPTY;
  142.     unsigned char        nhsync;
  143.     XF86VidModeSyncRange*    hsync;
  144.     unsigned char        nvsync;
  145.     XF86VidModeSyncRange*    vsync;
  146. } XF86VidModeMonitor;
  147.     
  148. typedef struct {
  149.     int type;            /* of event */
  150.     unsigned long serial;    /* # of last request processed by server */
  151.     Bool send_event;        /* true if this came from a SendEvent req */
  152.     Display *display;        /* Display the event was read from */
  153.     Window root;        /* root window of event screen */
  154.     int state;            /* What happened */
  155.     int kind;            /* What happened */
  156.     Bool forced;        /* extents of new region */
  157.     Time time;            /* event timestamp */
  158. } XF86VidModeNotifyEvent;
  159.  
  160. typedef struct {
  161.     float red;            /* Red Gamma value */
  162.     float green;        /* Green Gamma value */
  163.     float blue;            /* Blue Gamma value */
  164. } XF86VidModeGamma;
  165.  
  166.  
  167. #define XF86VidModeSelectNextMode(disp, scr) \
  168.     XF86VidModeSwitchMode(disp, scr, 1)
  169. #define XF86VidModeSelectPrevMode(disp, scr) \
  170.     XF86VidModeSwitchMode(disp, scr, -1)
  171.  
  172. _XFUNCPROTOBEGIN
  173.  
  174. Bool XF86VidModeQueryVersion(
  175.     Display*        /* dpy */,
  176.     int*        /* majorVersion */,
  177.     int*        /* minorVersion */
  178. );
  179.  
  180. Bool XF86VidModeQueryExtension(
  181.     Display*        /* dpy */,
  182.     int*        /* event_base */,
  183.     int*        /* error_base */
  184. );
  185.  
  186. Bool XF86VidModeSetClientVersion(
  187.     Display*        /* dpy */
  188. );
  189.  
  190. Bool XF86VidModeGetModeLine(
  191.     Display*            /* dpy */,
  192.     int                /* screen */,
  193.     int*            /* dotclock */,
  194.     XF86VidModeModeLine*    /* modeline */
  195. );
  196.  
  197. Bool XF86VidModeGetAllModeLines(
  198.     Display*            /* dpy */,
  199.     int                /* screen */,
  200.     int*            /* modecount */,
  201.     XF86VidModeModeInfo***    /* modelinesPtr */
  202. );
  203.  
  204. Bool XF86VidModeAddModeLine(
  205.     Display*            /* dpy */,
  206.     int                /* screen */,
  207.     XF86VidModeModeInfo*    /* new modeline */,
  208.     XF86VidModeModeInfo*    /* after modeline */
  209. );
  210.  
  211. Bool XF86VidModeDeleteModeLine(
  212.     Display*            /* dpy */,
  213.     int                /* screen */,
  214.     XF86VidModeModeInfo*    /* modeline */
  215. );
  216.  
  217. Bool XF86VidModeModModeLine(
  218.     Display*            /* dpy */,
  219.     int                /* screen */,
  220.     XF86VidModeModeLine*    /* modeline */
  221. );
  222.  
  223. Status XF86VidModeValidateModeLine(
  224.     Display*            /* dpy */,
  225.     int                /* screen */,
  226.     XF86VidModeModeInfo*    /* modeline */
  227. );
  228.  
  229. Bool XF86VidModeSwitchMode(
  230.     Display*        /* dpy */,
  231.     int            /* screen */,
  232.     int            /* zoom */
  233. );
  234.  
  235. Bool XF86VidModeSwitchToMode(
  236.     Display*            /* dpy */,
  237.     int                /* screen */,
  238.     XF86VidModeModeInfo*    /* modeline */
  239. );
  240.  
  241. Bool XF86VidModeLockModeSwitch(
  242.     Display*        /* dpy */,
  243.     int            /* screen */,
  244.     int            /* lock */
  245. );
  246.  
  247. Bool XF86VidModeGetMonitor(
  248.     Display*        /* dpy */,
  249.     int            /* screen */,
  250.     XF86VidModeMonitor*    /* monitor */
  251. );
  252.  
  253. Bool XF86VidModeGetViewPort(
  254.     Display*        /* dpy */,
  255.     int            /* screen */,
  256.     int*        /* x return */,
  257.     int*        /* y return */
  258. );
  259.  
  260. Bool XF86VidModeSetViewPort(
  261.     Display*        /* dpy */,
  262.     int            /* screen */,
  263.     int            /* x */,
  264.     int            /* y */
  265. );
  266.  
  267. Bool XF86VidModeGetDotClocks(
  268.     Display*        /* dpy */,
  269.     int            /* screen */,
  270.     int*        /* flags return */,
  271.     int*        /* number of clocks return */,
  272.     int*        /* max dot clock return */,
  273.     int**        /* clocks return */
  274. );
  275.  
  276. Bool XF86VidModeGetGamma(
  277.     Display*            /* dpy */,
  278.     int                /* screen */,
  279.     XF86VidModeGamma*        /* Gamma */
  280. );
  281.  
  282. Bool XF86VidModeSetGamma(
  283.     Display*            /* dpy */,
  284.     int                /* screen */,
  285.     XF86VidModeGamma*        /* Gamma */
  286. );
  287.  
  288. Bool XF86VidModeSetGammaRamp(
  289.     Display*                    /* dpy */,
  290.     int                         /* screen */,
  291.     int                /* size */, 
  292.     unsigned short*             /* red array */,
  293.     unsigned short*             /* green array */,
  294.     unsigned short*             /* blue array */
  295. );
  296.  
  297. Bool XF86VidModeGetGammaRamp(
  298.     Display*                    /* dpy */,
  299.     int                         /* screen */,
  300.     int                         /* size */,
  301.     unsigned short*             /* red array */,
  302.     unsigned short*             /* green array */,
  303.     unsigned short*             /* blue array */
  304. );
  305.  
  306. Bool XF86VidModeGetGammaRampSize(
  307.     Display*                    /* dpy */,
  308.     int                         /* screen */,
  309.     int*                        /* size */
  310. );
  311.  
  312. Bool XF86VidModeGetPermissions(
  313.     Display*                    /* dpy */,
  314.     int                         /* screen */,
  315.     int*            /* permissions */
  316. );
  317.  
  318. _XFUNCPROTOEND
  319.  
  320. #endif
  321.  
  322. #endif
  323.